package com.erp.remote.financial;

import com.erp.util.AjaxResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @package: com.erp.remote.financial
 * @className: PaymentSlipsRemote
 * @author: SHENYI
 * @description: 付款单接口
 * @date: 2025/7/17 10:01
 * @version: 1.0
 */
public interface PaymentSlipsRemote {

    @PostMapping("/financial/payment/handle_4_process_end")
    AjaxResult handle4ProcessEnd(@RequestBody Map<String, Object> params);

    /*
     * @description:
     * 查看指定单据是否有关联的核销单/付款单/收款单
     * @author: SHENYI
     * @date: 2025/7/19
     * @param: [slipsSerial ==> 单据编号, companyId ==> 公司id]
     * @return: com.erp.util.AjaxResult ==> 若有关联单据, 返回值为null
     */
    @GetMapping("/financial/payment/check_4_has_os")
    AjaxResult check4HasOs(@RequestParam("slipsSerial") String slipsSerial, @RequestParam("companyId") Integer companyId);


    /*
     * @description: 根据公司id查询该公司下的付款单数量
     * @author: SHENYI
     * @date: 2025/7/22
     * @param: [companyId]
     * @return: com.erp.util.AjaxResult
     */
    @GetMapping("/financial/payment/count_4_company")
    AjaxResult count4Company(@RequestParam("companyId") Integer companyId);
}
